package com.csun.nusing.ui.activity;

import android.graphics.Color;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.csun.nusing.R;
import com.csun.nusing.presenter.CommonPresenter;
import com.csun.nusing.ui.BaseActivity;

/**
 * 用户手册
 * 作者: Created by fzq on 2018/2/11 13:38
 * 邮箱: 15997123593@163.com
 */
public class UserBookActivity extends BaseActivity<CommonPresenter> {


    private WebView webView;
    private boolean isFamilyFlag;
    private RelativeLayout toprl;

    @Override
    public int getContentViewId() {
        return R.layout.activity_user_book;
    }

    @Override
    public void initSubViews(View view) {
        super.initSubViews(view);
        toprl = (RelativeLayout)findViewById(R.id.userbook_top_rl);
        webView = (WebView) findViewById(R.id.use_book_web_view);
    }

    @Override
    public void initData() {
        super.initData();
        isFamilyFlag = getIntent().getBooleanExtra("isFamily",false);
        if (isFamilyFlag){
            toprl.setBackgroundResource(R.drawable.main_whiteyello_color_shape);
        }else{
            toprl.setBackgroundResource(R.drawable.main_whiteblur_color_shape);
        }
        webView.setBackgroundColor(Color.TRANSPARENT); // 设置背景色
        webView.loadUrl("http://www.51cs8.com/NursingCloud/Instructions.html");
//        http://www.51cs8.com/NursingCloud/Instructions.html
    }
}
